﻿using UnityEngine;
using System.Collections;
using System;

namespace CHFramework
{
    public class BaseUI : MonoBehaviour
    {
        #region 字段和属性
        //当前窗体类型
        private UIType _CurrentUIType = new UIType();
        public UIType CurrentUIType
        {
            get { return _CurrentUIType; }
            set { _CurrentUIType = value; }
        }
        #endregion

        #region 窗体的四种状态（生命周期）
        /// <summary>
        /// 显示状态
        /// </summary>
        public virtual void Show()
        {
            this.gameObject.SetActive(true);
        }

        /// <summary>
        /// 隐藏状态
        /// </summary>
        public virtual void Hide()
        {
            this.gameObject.SetActive(false);
        }

        /// <summary>
        /// 重新显示状态
        /// </summary>
        public virtual void ReShow()
        {
            this.gameObject.SetActive(true);
        }

        /// <summary>
        /// 冻结状态
        /// </summary>
        public virtual void Freeze()
        {
            this.gameObject.SetActive(true);
        }
        #endregion

        #region 封装自雷常用的方法

        public virtual void ShowUI(float progress)
        {

        }

        #endregion
    }
}
